/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package healthcare.coursework.util;

import java.sql.Timestamp;
import javax.xml.bind.annotation.adapters.XmlAdapter;

/**
 *
 * @author Administrator
 */
public class TimestampAdapter extends XmlAdapter<String,Timestamp>{

    @Override
    public Timestamp unmarshal(String val) throws Exception {
        return Timestamp.valueOf(val);
    }

    @Override
    public String marshal(Timestamp v) throws Exception {
        return v.toString();
    }

}
